const { createProxyMiddleware } = require("http-proxy-middleware");
const URL = process.env.REACT_APP_SERVER_URL;
module.exports = function (app) {
  app.use(
    createProxyMiddleware("/api", {
      // target: "http://localhost:4455/", //读取统一服务器地址
      target: URL, //读取统一服务器地址
      // changeOrigin: true,
      // ws: true,
      pathRewrite: { "": "" },
    })
  );
};
